<template>
  <div>
    <el-table
      :data="articleAudit"
      style="width: 1000px"
      border>
      <el-table-column
        prop="articleId"
        label="文章编号">
      </el-table-column>
      <el-table-column
        prop="articleTitle"
        label="文章标题">
      </el-table-column>
      <el-table-column
        prop="crateTime"
        label="创建时间">
      </el-table-column>
      <el-table-column
        prop="teacherName"
        label="审核人">
      </el-table-column>
      <el-table-column
        prop="opinion"
        label="审核意见">
      </el-table-column>
      <el-table-column
        prop="opinionTime"
        label="审核时间">
      </el-table-column>

      <el-table-column
        label="操作"
        width="250px">
        <template slot-scope="scope">
          <el-button
            size="mini"
            @click="turnPage(scope.row.articleId,'display')">查看
          </el-button>
          <el-button
            size="mini"
            @click="turnPage(scope.row.articleId,'edit')">编辑
          </el-button>
        </template>
      </el-table-column>

    </el-table>
  </div>
</template>

<script>
  import {SystemManageService} from '../SystemManageService'
  export default {
    name: "ArticleAuditList",
    data(){
      return{
        articleAudit:[]
      }
    },
    mounted: function () {
      this.auditOpinions()
    },
    methods: {
      turnPage(articleId, type) {
        this.$emit('turnPage', articleId, type)
      },
      auditOpinions() {
        SystemManageService.auditOpinions().then(res => {
          this.articleAudit = res.data;
        })
      },
    }
  }
</script>

<style scoped>

</style>
